package solved;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.SortedSet;
import java.util.TreeSet;

/*
ID:		liluyan1
LANG:	JAVA
TASK:	frac1
*/
public class frac1 {
	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new FileReader("frac1.in"));
		PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(
				"frac1.out")));
		new frac1().solve(f, out);
		out.close();
		System.exit(0);
	}
	
	private void solve(BufferedReader f, PrintWriter out) throws IOException {
		int N = read(f);
		out.println("0/1");
		SortedSet<Fraction> set = new TreeSet<Fraction>();
		for (int i=1; i<=N; i++) {
			for (int j=1; j<i; j++) {
				if (maxCommon(j, i) == 1) {
					set.add(new Fraction(j, i));
				}
			}
		}
		
		for (Fraction fr : set) {
			out.println(fr.toString());
		}
		
		out.println("1/1");
	}
	
	private class Fraction implements Comparable {
		int a;
		int b;
		public Fraction(int a, int b) {
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(Object o) {
			return a*((Fraction)o).b - b*((Fraction)o).a;
		}
		
		public String toString() {
			return a + "/" + b;
		}
	}
	
	private int maxCommon(int a, int b) {
		int a1 = Math.max(a, b);
		int a2 = Math.min(a, b);
		return a1%a2 == 0? a2 : maxCommon(a2, a1%a2);
	}
	
	public int read(BufferedReader f) throws IOException {
		return Integer.parseInt(f.readLine());
	}
	
	public int[] read(BufferedReader f, int N) throws IOException {
		String[] t = f.readLine().split(" ");
		int[] a = new int[N];
		for (int i=0; i<N; i++) {
			a[i] = Integer.parseInt(t[i]);
		}
		return a;
	}
}
